package com.huilian.iotbox.data.enums;

import lombok.Getter;

@Getter
public enum MainBoardEnum {
    S8810P("S8810P", "第一块板", "ttyS3", "ttyS1"),
    RK312X("rk312x", "第二块板", "ttyS0", "ttyS1"),
    RK3288("rk3288", "第三块板，愉悦龙盟(定昌2G板)", "ttyS3", "ttyS1"),
    RK3126C("rk3126c", "定昌1G板", "ttyS2", "ttyS1"),;

    private String name;
    private String msg;
    // 与控制板串口通讯编号，如ttyS0
    private String standardName;
    // 反扫器串口通讯编号，如ttyS3
    private String scanName;

    MainBoardEnum(String name, String msg, String standardName, String scanName) {
        this.name = name;
        this.msg = msg;
        this.standardName = standardName;
        this.scanName = scanName;
    }

    public static String getName(String name){
        for (MainBoardEnum v : MainBoardEnum.values()) {
            if (name.equalsIgnoreCase(v.getName())){
                return v.getName();
            }
        }
        return null;
    }
}
